<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>问卷收集</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="./layui/css/layui.css">
    <script src="./layui/layui.js"></script>

</head>
<body>

<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;color: #a6c2ae"><legend>基础信息</legend></fieldset>

<form class="layui-form" action="">
    <div class="layui-inline">
        <label class="layui-form-label">单位名称</label>
        <div class="layui-input-inline">
            <select name="modules" lay-verify="required" lay-search="">
                <option value="">直接选择或搜索选择</option>
                <option value="1">layer</option>
                <option value="2">form</option>
                <option value="3">layim</option>
                <option value="4">element</option>
                <option value="5">laytpl</option>
            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">单位地址</label>
        <div class="layui-input-block">
            <input type="text" name="username" lay-verify="required" lay-reqtext="请输入单位地址" placeholder="请输入单位地址"
                   autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名</label>
        <div class="layui-input-block">
            <input type="text" name="username" lay-verify="required" lay-reqtext="请输入填报人姓名" placeholder="请输入填报人姓名"
                   autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">联系方式</label>
        <div class="layui-input-block">
            <input type="tel" name="phone" lay-verify="required|phone" lay-reqtext="请输入联系方式" placeholder="请输入联系方式"
                   autocomplete="off" class="layui-input demo-phone">
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">所属辖区</label>
        <div class="layui-input-inline">
            <select name="quiz1">
                <option value="">请选择城区（县）</option>
                <option value="郑州市金水区" selected="">郑州市金水区</option>
                <option value="郑州市中原区">郑州市中原区</option>
                <option value="郑州市管城区">郑州市管城区</option>
                <option value="郑州市惠济区">郑州市惠济区</option>
                <option value="郑州市二七区">郑州市二七区</option>
            </select>
        </div>
        <div class="layui-input-inline">
            <select name="quiz2">
                <option value="">请选择镇（街道）</option>
                <option value="中原区须水街道办事处">中原区须水街道办事处</option>
                <option value="中原区林山寨街道办事处" disabled="">中原区林山寨街道办事处</option>
                <option value="中原区绿东村街道办事处">中原区绿东村街道办事处</option>
                <option value="中原区航海西路街道办事处">中原区航海西路街道办事处</option>
            </select>
        </div>
        <div class="layui-input-inline">
            <select name="quiz3">
                <option value="">请选择街道（村）</option>
                <option value="A小区">A小区</option>
                <option value="B小区">B小区</option>
                <option value="C小区">C小区</option>
            </select>
        </div>
        <div class="layui-form-mid layui-word-aux">此处只是演示联动排版，并未做联动交互</div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">单位类型</label>
        <div class="layui-input-block">
            <input type="radio" name="sex" value="科研类" title="科研类" checked="">
            <input type="radio" name="sex" value="商业类" title="商业类">
            <input type="radio" name="sex" value="金融类" title="金融类">
            <input type="radio" name="sex" value="教育类" title="教育类">
            <input type="radio" name="sex" value="医院类" title="医院类">
            <input type="radio" name="sex" value="双创孵化类" title="双创孵化类">
            <input type="radio" name="sex" value="软件服务类" title="软件服务类">
            <input type="radio" name="sex" value="生物医药类" title="生物医药类">
            <input type="radio" name="sex" value="电子科技类" title="电子科技类">
            <input type="radio" name="sex" value="装备制造类" title="装备制造类">
            <input type="radio" name="sex" value="其他" title="其他">
            <input type="radio" name="sex" value="禁" title="禁用" disabled="">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">从业人员数</label>
        <div class="layui-input-block">
            <input type="text" name="username" lay-verify="required|number" lay-reqtext="" placeholder=""
                   autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">经营管理人才数</label>
        <div class="layui-input-block">
            <input type="text" name="username" lay-verify="required|number" lay-reqtext="" placeholder=""
                   autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">技术人才数</label>
        <div class="layui-input-block">
            <input type="text" name="username" lay-verify="required|number" lay-reqtext="" placeholder=""
                   autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">执业资格证数</label>
        <div class="layui-input-block">
            <input type="text" name="username" lay-verify="required|number" lay-reqtext="" placeholder=""
                   autocomplete="off" class="layui-input">
        </div>
    </div>

    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;color: #a6c2ae"><legend>人才学历层次</legend></fieldset>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">博士后</label>
            <div class="layui-input-inline">
                <input type="text" name="number" autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">人</div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">博士</label>
            <div class="layui-input-inline">
                <input type="text" name="number" autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">人</div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">硕士</label>
            <div class="layui-input-inline">
                <input type="text" name="number" autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">人</div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">本科</label>
            <div class="layui-input-inline">
                <input type="text" name="number" autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">人</div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">大专</label>
            <div class="layui-input-inline">
                <input type="text" name="number" autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">人</div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">中专</label>
            <div class="layui-input-inline">
                <input type="text" name="number" autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">人</div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">高中及以下</label>
            <div class="layui-input-inline">
                <input type="text" name="number" autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">人</div>
        </div>
    </div>


    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;color: #a6c2ae"><legend>年龄区间</legend></fieldset>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">45岁及以下人数</label>
            <div class="layui-input-inline">
                <input type="text" name="number" autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">人</div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">45岁以上人数</label>
            <div class="layui-input-inline">
                <input type="text" name="number" autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">人</div>
        </div>
    </div>
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;color: #a6c2ae"><legend>专业技术人才</legend></fieldset>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">正高级职称</label>
            <div class="layui-input-inline">
                <input type="text" name="number" autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">人</div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">副高级职称</label>
            <div class="layui-input-inline">
                <input type="text" name="number" autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">人</div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">中级职称</label>
            <div class="layui-input-inline">
                <input type="text" name="number" autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">人</div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">初级职称</label>
            <div class="layui-input-inline">
                <input type="text" name="number" autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">人</div>
        </div>
    </div>
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;color: #a6c2ae"><legend>专业技能人才</legend></fieldset>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">高级技师</label>
            <div class="layui-input-inline">
                <input type="text" name="number" autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">人</div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">技师</label>
            <div class="layui-input-inline">
                <input type="text" name="number" autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">人</div>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <button type="submit" class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>



<script>
    layui.use(['form', 'util', 'laydate'], function () {
        var form = layui.form;
        var layer = layui.layer;
        var util = layui.util;
        var laydate = layui.laydate;

        //日期
        laydate.render({
            elem: '#date'
        });
        laydate.render({
            elem: '#date1'
        });

        //自定义验证规则
        form.verify({
            title: function (value) {
                if (value.length < 5) {
                    return '标题至少得5个字符啊';
                }
            }
            , pass: [
                /^[\S]{6,12}$/
                , '密码必须6到12位，且不能出现空格'
            ]
        });

        //指定开关事件
        form.on('switch(switchTest)', function (data) {
            layer.msg('开关checked：' + (this.checked ? 'true' : 'false'), {
                offset: '6px'
            });
            layer.tips('温馨提示：请注意开关状态的文字可以随意定义，而不仅仅是ON|OFF', data.othis)
        });

        //提交事件
        form.on('submit(demo1)', function (data) {
            alert(JSON.stringify(data.field), {
                title: '最终的提交信息'
            })
            return false;
        });

        //表单赋值
        layui.$('#LAY-component-form-setval').on('click', function () {
            form.val('example', {
                "username": "贤心" // "name": "value"
                , "password": "123456"
                , "interest": 1
                , "like[write]": true //复选框选中状态
                , "close": true //开关状态
                , "sex": "女"
                , "desc": "我爱 layui"
            });
        });

        //表单取值
        layui.$('#LAY-component-form-getval').on('click', function () {
            var data = form.val('example');
            alert(JSON.stringify(data));
        });
        // 普通事件
        util.on('lay-on', {
            // 获取验证码
            "get-vercode": function (othis) {
                var isvalid = form.validate('.demo-phone'); // v2.7.0 新增
                // 验证通过
                if (isvalid) {
                    layer.msg('手机号验证通过，执行发送验证码的操作');
                }
            }
        });

    });
</script>

</body>
</html>